#@Author: bjy @Date: 2019/4/20 15:11 @Version 1.0#
<template>
      <el-table :data="tableDataList" highlight-current-row @current-change="handleTableChange" ref="singleTable"
                border style="width: 98%;margin:0 1%" height="600"
                :row-class-name="tableRowClassName">
      >
        <el-table-column prop="real_name" label="活动发起支部" width="180"></el-table-column>
        <el-table-column prop="activitytitle" label="活动名称" width="180"></el-table-column>
        <el-table-column prop="categoryintegral" label="活动签到积分"></el-table-column>
        <el-table-column prop="activitystarttime" label="活动开始时间"></el-table-column>
        <el-table-column prop="activityendtime" label="活动结束时间"></el-table-column>
        <el-table-column prop="activitysitename" label="活动地点"></el-table-column>
        <el-table-column prop="activitynumber" label="面向人数"></el-table-column>
        <el-table-column prop="categoryname" label="活动类型"></el-table-column>
        <el-table-column prop="activitystatus" label="活动状态"></el-table-column>
      </el-table>
</template>

<script>
    //  此处导入组件,格式,例如:import xxx名称 from "路径"
    export default{
        // 这里是name,记得填写
        name: 'ActivityListSub',
        // 子组件接收属性
        props: ['tableDataList'],
        //  数据定义
        data () {
            return {
            }
        },
        // 页面方法
        methods: {
          handleTableChange(e){
            this.$emit('changeData',e)
          },
          tableRowClassName({row, rowIndex}) {
              let activityFlag = row.activityflag
            if (activityFlag === 0) {
              return 'warning-row';
            } else if (activityFlag === 1) {
              return 'success-row';
            }
            return '';
          }
        },
        // 计算属性
        computed: {},
        // 侦听器
        watch: {},
        // 依赖注入
        components: {}
    }
</script>

<!-- 本地样式 -->
<style>
  .el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #ffffff;
  }
</style>
